import { post } from '@/utils/request'
// 活动审核
export const activityShen = (p) => post(`/service-marketing/b/campaign/v1/check`, p, 'post')
// 优惠券审核
export const couponShen = (p) => post(`/service-marketing/b/coupon/v1/check`, p, 'post')

//  获取公钥
export const publicKey = p => post(`/service-uaa/uaa/v1/oauth/publicKey`, p, 'get')

//  发送验证码
export const sendCode = p => post(`/service-msg/msg/sendSms/v1/loginCheck/${p.tel}`, p, 'get')
// 发送修改密码验证码
export const sendEditPasswordCode = p => post(`/service-msg/msg/sendSms/v1/modifyPwd/${p.tel}`, p, 'get')

//  加载租户
export const loadTenantId = (p, header) => post(`/service-uaa/uaa/v1/loadTenantId`, p, 'get', header)

// 字典值下拉列表查询
export const searchAllDictionaries = (p) => post(`/service-global/g/dictValue/v1/queryListByType/${p.type}`, p, 'get')

// 类目树
export const categoryTree = (p) => post(`/service-goods/b/goodscategory/v1/list`, p, 'get')
// 查询没添加商品属性的树
export const categoryVaildTree = (p) => post(`/service-goods/b/goodscategory/v1/attrList`, p, 'get')

// 商品分组下拉列表
export const goodsGroupTree = (p) => post(`/service-goods/b/goodsgroup/v1/listByValid`, p, 'get')
// 商品属性下拉列表
export const goodsSkuList = (p) => post(`/service-goods/b/goodsattr/v1/list/${p.id}`, p, 'get')
// 查询当前租户拥有指定模块权限菜单     SHOP-商户,TENANT-租户,CUSTOMER_SERVICE-客服台
export const getMenu = (p) => post(`/service-upms/b/permission/v1/menus/${p.module}`, p, 'get')
// 查询当前租户拥有指定模块权限菜单     SHOP-商户,TENANT-租户,CUSTOMER_SERVICE-客服台
export const getEffectivePageList = (p) => post(`/service-system/b/sysshops/v1/effectivePageList`, p, 'post')
// 查询单据类型树
export const getBillTypeTreeList = (p) => post(`/service-system/b/billType/v1/treeList/${p.parentId}`, p, 'get')
// 查询单据类型树
export const getBillTypeList = (p) => post(`/service-system/b/billType/v1/list`, p)
// 查询应用场景列表
export const listSceneByType = (p) => post(`/service-system/b/sceneCenter/v1/listByType/${p.type}`, p)
